package cn.itsource.article.service;


import cn.itsource.article.domain.Article;
import cn.itsource.article.query.ArticleQuery;
import cn.itsource.article.vo.ArticleVo;
import cn.itsource.param.domain.Like;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface ArticleService {


    /**
     * 新增
     * @param a
     * @return
     */
    void insert(Article a);



    /**
     * 修改
     * @param a
     * @return
     */
    void updateByPrimaryKeySelective(Article a);



    /**
     * 分页
     * @return
     */
    PageInfo<Article> pageInfo(ArticleQuery articleTypeQuery);


    void deleteAll(List<Article> a);

    /**
     * 删除
     * @param id
     * @return
     */
    int deleteByPrimaryKey(Long id);


    List<ArticleVo> group();

    List<ArticleVo> placeOnFile();

    /**
     * 根据id查询文章对象
     * @param articleId
     * @return
     */
    Article selectId(Long articleId);

    List<Article> aboutArticles(Long articleId);


    void like(Like like);


    void incrementReadCount(Long articleId);

    List<Article> drawColumnChart();



}
